<script type="text/html" id="areaTemp">
<option value="-1">请选择</option>
{%each list as value index}
<option value="{%value.area_id}"{%if index == 0} selected="selected"{%/if}>{%value.area_name}</option>
{%/each}
</script>

<script type="text/javascript">
$("#province").bind("change", function(){
	$.get("<%url('uc/address/getarea')%>?pid=" + $(this).val(), function(data){
		var area = data.area;
		var html = template("areaTemp", {list: area});
		$("#city").html(html);
		$("#city").change();
	});
});

$("#city").bind("change", function(){
	$.get("<%url('uc/address/getarea')%>?pid=" + $(this).val(), function(data){
		var area = data.area;
		var html = template("areaTemp", {list: area});
		$("#area").html(html);
	});
});
</script>